home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / Magazine / Morphos / GCC / lib / gcc-lib / ppc-amigaos / 2.95.1 / sys-include / powerup / ppcpragmas / realtime_pragmas.h < prev    next >
C/C++ Source or Header  |  2000-03-13  |  7KB  |  230 lines

  1. /* Automatically generated header! Do not edit! */
  2.  
  3. #ifndef _PPCPRAGMA_REALTIME_H
  4. #define _PPCPRAGMA_REALTIME_H
  5. #ifdef __GNUC__
  6. #ifndef _PPCINLINE__REALTIME_H
  7. #include <powerup/ppcinline/realtime.h>
  8. #endif
  9. #else
  10.  
  11. #ifndef POWERUP_PPCLIB_INTERFACE_H
  12. #include <powerup/ppclib/interface.h>
  13. #endif
  14.  
  15. #ifndef POWERUP_GCCLIB_PROTOS_H
  16. #include <powerup/gcclib/powerup_protos.h>
  17. #endif
  18.  
  19. #ifndef NO_PPCINLINE_STDARG
  20. #define NO_PPCINLINE_STDARG
  21. #endif/* SAS C PPC inlines */
  22.  
  23. #ifndef REALTIME_BASE_NAME
  24. #define REALTIME_BASE_NAME RealTimeBase
  25. #endif /* !REALTIME_BASE_NAME */
  26.  
  27. #define    CreatePlayerA(tagList)    _CreatePlayerA(REALTIME_BASE_NAME, tagList)
  28.  
  29. static __inline struct Player *
  30. _CreatePlayerA(void *RealTimeBase, struct TagItem *tagList)
  31. {
  32. struct Caos    MyCaos;
  33.     MyCaos.M68kCacheMode    =    IF_CACHEFLUSHALL;
  34. //    MyCaos.M68kStart    =    NULL;
  35. //    MyCaos.M68kSize        =    0;
  36.     MyCaos.PPCCacheMode    =    IF_CACHEFLUSHALL;
  37. //    MyCaos.PPCStart        =    NULL;
  38. //    MyCaos.PPCSize        =    0;
  39.     MyCaos.a0        =(ULONG) tagList;
  40.     MyCaos.caos_Un.Offset    =    (-42);
  41.     MyCaos.a6        =(ULONG) RealTimeBase;    
  42.     return((struct Player *)PPCCallOS(&MyCaos));
  43. }
  44.  
  45. #ifndef NO_PPCINLINE_STDARG
  46. #define CreatePlayer(tags...) \
  47.     ({ULONG _tags[] = { tags }; CreatePlayerA((struct TagItem *)_tags);})
  48. #endif /* !NO_PPCINLINE_STDARG */
  49.  
  50. #define    DeletePlayer(player)    _DeletePlayer(REALTIME_BASE_NAME, player)
  51.  
  52. static __inline void
  53. _DeletePlayer(void *RealTimeBase, struct Player *player)
  54. {
  55. struct Caos    MyCaos;
  56.     MyCaos.M68kCacheMode    =    IF_CACHEFLUSHALL;
  57. //    MyCaos.M68kStart    =    NULL;
  58. //    MyCaos.M68kSize        =    0;
  59.     MyCaos.PPCCacheMode    =    IF_CACHEFLUSHALL;
  60. //    MyCaos.PPCStart        =    NULL;
  61. //    MyCaos.PPCSize        =    0;
  62.     MyCaos.a0        =(ULONG) player;
  63.     MyCaos.caos_Un.Offset    =    (-48);
  64.     MyCaos.a6        =(ULONG) RealTimeBase;    
  65.     PPCCallOS(&MyCaos);
  66. }
  67.  
  68. #define    ExternalSync(player, minTime, maxTime)    _ExternalSync(REALTIME_BASE_NAME, player, minTime, maxTime)
  69.  
  70. static __inline BOOL
  71. _ExternalSync(void *RealTimeBase, struct Player *player, long minTime, long maxTime)
  72. {
  73. struct Caos    MyCaos;
  74.     MyCaos.M68kCacheMode    =    IF_CACHEFLUSHALL;
  75. //    MyCaos.M68kStart    =    NULL;
  76. //    MyCaos.M68kSize        =    0;
  77.     MyCaos.PPCCacheMode    =    IF_CACHEFLUSHALL;
  78. //    MyCaos.PPCStart        =    NULL;
  79. //    MyCaos.PPCSize        =    0;
  80.     MyCaos.a0        =(ULONG) player;
  81.     MyCaos.d0        =(ULONG) minTime;
  82.     MyCaos.d1        =(ULONG) maxTime;
  83.     MyCaos.caos_Un.Offset    =    (-66);
  84.     MyCaos.a6        =(ULONG) RealTimeBase;    
  85.     return((BOOL)PPCCallOS(&MyCaos));
  86. }
  87.  
  88. #define    FindConductor(name)    _FindConductor(REALTIME_BASE_NAME, name)
  89.  
  90. static __inline struct Conductor *
  91. _FindConductor(void *RealTimeBase, STRPTR name)
  92. {
  93. struct Caos    MyCaos;
  94.     MyCaos.M68kCacheMode    =    IF_CACHEFLUSHALL;
  95. //    MyCaos.M68kStart    =    NULL;
  96. //    MyCaos.M68kSize        =    0;
  97.     MyCaos.PPCCacheMode    =    IF_CACHEFLUSHALL;
  98. //    MyCaos.PPCStart        =    NULL;
  99. //    MyCaos.PPCSize        =    0;
  100.     MyCaos.a0        =(ULONG) name;
  101.     MyCaos.caos_Un.Offset    =    (-78);
  102.     MyCaos.a6        =(ULONG) RealTimeBase;    
  103.     return((struct Conductor *)PPCCallOS(&MyCaos));
  104. }
  105.  
  106. #define    GetPlayerAttrsA(player, tagList)    _GetPlayerAttrsA(REALTIME_BASE_NAME, player, tagList)
  107.  
  108. static __inline ULONG
  109. _GetPlayerAttrsA(void *RealTimeBase, struct Player *player, struct TagItem *tagList)
  110. {
  111. struct Caos    MyCaos;
  112.     MyCaos.M68kCacheMode    =    IF_CACHEFLUSHALL;
  113. //    MyCaos.M68kStart    =    NULL;
  114. //    MyCaos.M68kSize        =    0;
  115.     MyCaos.PPCCacheMode    =    IF_CACHEFLUSHALL;
  116. //    MyCaos.PPCStart        =    NULL;
  117. //    MyCaos.PPCSize        =    0;
  118.     MyCaos.a0        =(ULONG) player;
  119.     MyCaos.a1        =(ULONG) tagList;
  120.     MyCaos.caos_Un.Offset    =    (-84);
  121.     MyCaos.a6        =(ULONG) RealTimeBase;    
  122.     return((ULONG)PPCCallOS(&MyCaos));
  123. }
  124.  
  125. #ifndef NO_PPCINLINE_STDARG
  126. #define GetPlayerAttrs(a0, tags...) \
  127.     ({ULONG _tags[] = { tags }; GetPlayerAttrsA((a0), (struct TagItem *)_tags);})
  128. #endif /* !NO_PPCINLINE_STDARG */
  129.  
  130. #define    LockRealTime(lockType)    _LockRealTime(REALTIME_BASE_NAME, lockType)
  131.  
  132. static __inline APTR
  133. _LockRealTime(void *RealTimeBase, unsigned long lockType)
  134. {
  135. struct Caos    MyCaos;
  136.     MyCaos.M68kCacheMode    =    IF_CACHEFLUSHALL;
  137. //    MyCaos.M68kStart    =    NULL;
  138. //    MyCaos.M68kSize        =    0;
  139.     MyCaos.PPCCacheMode    =    IF_CACHEFLUSHALL;
  140. //    MyCaos.PPCStart        =    NULL;
  141. //    MyCaos.PPCSize        =    0;
  142.     MyCaos.d0        =(ULONG) lockType;
  143.     MyCaos.caos_Un.Offset    =    (-30);
  144.     MyCaos.a6        =(ULONG) RealTimeBase;    
  145.     return((APTR)PPCCallOS(&MyCaos));
  146. }
  147.  
  148. #define    NextConductor(previousConductor)    _NextConductor(REALTIME_BASE_NAME, previousConductor)
  149.  
  150. static __inline struct Conductor *
  151. _NextConductor(void *RealTimeBase, struct Conductor *previousConductor)
  152. {
  153. struct Caos    MyCaos;
  154.     MyCaos.M68kCacheMode    =    IF_CACHEFLUSHALL;
  155. //    MyCaos.M68kStart    =    NULL;
  156. //    MyCaos.M68kSize        =    0;
  157.     MyCaos.PPCCacheMode    =    IF_CACHEFLUSHALL;
  158. //    MyCaos.PPCStart        =    NULL;
  159. //    MyCaos.PPCSize        =    0;
  160.     MyCaos.a0        =(ULONG) previousConductor;
  161.     MyCaos.caos_Un.Offset    =    (-72);
  162.     MyCaos.a6        =(ULONG) RealTimeBase;    
  163.     return((struct Conductor *)PPCCallOS(&MyCaos));
  164. }
  165.  
  166. #define    SetConductorState(player, state, time)    _SetConductorState(REALTIME_BASE_NAME, player, state, time)
  167.  
  168. static __inline LONG
  169. _SetConductorState(void *RealTimeBase, struct Player *player, unsigned long state, long time)
  170. {
  171. struct Caos    MyCaos;
  172.     MyCaos.M68kCacheMode    =    IF_CACHEFLUSHALL;
  173. //    MyCaos.M68kStart    =    NULL;
  174. //    MyCaos.M68kSize        =    0;
  175.     MyCaos.PPCCacheMode    =    IF_CACHEFLUSHALL;
  176. //    MyCaos.PPCStart        =    NULL;
  177. //    MyCaos.PPCSize        =    0;
  178.     MyCaos.a0        =(ULONG) player;
  179.     MyCaos.d0        =(ULONG) state;
  180.     MyCaos.d1        =(ULONG) time;
  181.     MyCaos.caos_Un.Offset    =    (-60);
  182.     MyCaos.a6        =(ULONG) RealTimeBase;    
  183.     return((LONG)PPCCallOS(&MyCaos));
  184. }
  185.  
  186. #define    SetPlayerAttrsA(player, tagList)    _SetPlayerAttrsA(REALTIME_BASE_NAME, player, tagList)
  187.  
  188. static __inline BOOL
  189. _SetPlayerAttrsA(void *RealTimeBase, struct Player *player, struct TagItem *tagList)
  190. {
  191. struct Caos    MyCaos;
  192.     MyCaos.M68kCacheMode    =    IF_CACHEFLUSHALL;
  193. //    MyCaos.M68kStart    =    NULL;
  194. //    MyCaos.M68kSize        =    0;
  195.     MyCaos.PPCCacheMode    =    IF_CACHEFLUSHALL;
  196. //    MyCaos.PPCStart        =    NULL;
  197. //    MyCaos.PPCSize        =    0;
  198.     MyCaos.a0        =(ULONG) player;
  199.     MyCaos.a1        =(ULONG) tagList;
  200.     MyCaos.caos_Un.Offset    =    (-54);
  201.     MyCaos.a6        =(ULONG) RealTimeBase;    
  202.     return((BOOL)PPCCallOS(&MyCaos));
  203. }
  204.  
  205. #ifndef NO_PPCINLINE_STDARG
  206. #define SetPlayerAttrs(a0, tags...) \
  207.     ({ULONG _tags[] = { tags }; SetPlayerAttrsA((a0), (struct TagItem *)_tags);})
  208. #endif /* !NO_PPCINLINE_STDARG */
  209.  
  210. #define    UnlockRealTime(lock)    _UnlockRealTime(REALTIME_BASE_NAME, lock)
  211.  
  212. static __inline void
  213. _UnlockRealTime(void *RealTimeBase, APTR lock)
  214. {
  215. struct Caos    MyCaos;
  216.     MyCaos.M68kCacheMode    =    IF_CACHEFLUSHALL;
  217. //    MyCaos.M68kStart    =    NULL;
  218. //    MyCaos.M68kSize        =    0;
  219.     MyCaos.PPCCacheMode    =    IF_CACHEFLUSHALL;
  220. //    MyCaos.PPCStart        =    NULL;
  221. //    MyCaos.PPCSize        =    0;
  222.     MyCaos.a0        =(ULONG) lock;
  223.     MyCaos.caos_Un.Offset    =    (-36);
  224.     MyCaos.a6        =(ULONG) RealTimeBase;    
  225.     PPCCallOS(&MyCaos);
  226. }
  227.  
  228. #endif /* SASC Pragmas */
  229. #endif /* !_PPCPRAGMA_REALTIME_H */
  230.